//
//  HomeImageModel.m
//  110
//
//  Created by 沈鑫 on 16/4/8.
//  Copyright © 2016年 乔砥. All rights reserved.
//

#import "HomeImageModel.h"

@implementation HomeImageModel
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"])
    {
        // ID与系统关键字重复 需要重新赋值
        [self setValue:value forKey:@"_id"];
    }
}

+ (NSMutableArray *)getData:(NSDictionary *)dic
{
    NSMutableArray *bigArray = [NSMutableArray array];
    NSDictionary *dic1 = dic[@"list"];
    NSMutableArray *array = dic1[@"drug_list"];
    HomeImageModel *model = [[HomeImageModel alloc]init];
    model.banner_image_url = dic1[@"banner_image_url"];
    [bigArray addObject:model];
    
    for (NSDictionary *dic2 in array)
    {
        HomeImageModel *model1 = [[HomeImageModel alloc]init];
        [model1 setValuesForKeysWithDictionary:dic2];
        [bigArray addObject:model1];
    }
    return bigArray;
}



@end
